import { mapState } from 'vuex'
import { MANAGER_ROLE_CODE, TENANT_ROLE_CODE } from '@/const'

export default {
    computed: {
        ...mapState(['loginerRole']),
        isManager() {
            return MANAGER_ROLE_CODE === this.loginerRole
        },
        isTenant() {
            return TENANT_ROLE_CODE === this.loginerRole
        },
        subUserFlag() {
            return this.loginerRole === MANAGER_ROLE_CODE ? '租户' : '用户'
        },
        subListFlag() {
            return this.loginerRole === MANAGER_ROLE_CODE ? 'tenantList' : 'userList'
        }
    }
}